package com.compala.hajniapp;
import android.widget.Toast;
import android.os.Bundle;
import android.app.Activity;
import android.app.AlertDialog;
import android.content.Intent;
import android.view.Menu;
import android.view.View;

public class HomeActivity extends Activity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        getActionBar().hide();
        boolean firstrun = getSharedPreferences("PREFERENCE", MODE_PRIVATE).getBoolean("firstrun", true);
        if (firstrun){
        	new AlertDialog.Builder(this)
        		.setTitle("Drága Szerelmem")
        		.setMessage("Képzeld az a tervem támadt, hogy a kreativitásom eddig csak a programozásban éltem ki igazán, ezért kapsz egy kis ízelítőt :)")
        		.setNeutralButton("Rendben", null)
        		.show();
        	// Save the state
	        getSharedPreferences("PREFERENCE", MODE_PRIVATE)
	            .edit()
	            .putBoolean("firstrun", false)
	            .commit();
        }
    }


    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        // Inflate the menu; this adds items to the action bar if it is present.
        getMenuInflater().inflate(R.menu.main, menu);
        return true;
    }
    /** Called when the user clicks the Send button */
    public void openMain(View view) {
        Intent intent = new Intent(this, MainActivity.class);
        startActivity(intent);
    }
    
}
